' ***^^^***|||***^^^***
' 
'  This file is regenerated until it's edited. Delete the file to force regeneration.

'  NOTE: This denotes the way the file was created and it's possible the 
'        generation type has since changed.
'        Check the generation script for the curent state of the file.

' %%%###%%%15e8505986b7304b73cee9c15e53d65a%%%###%%%
' %%%##NoWS##%%%429f232331c6805816a34b2f72dbf1be%%%##NoWS##%%%
' ***^^^***|||***^^^***

  
'************************************************************************************
' Copyright © 2003-2006 Kathleen Dollard
'
' This software is provided 'as-is', without any express or implied warranty. In no 
' event will the author be held liable for any damages arising from the use of this
' software.
' 
' You may use this software for any purpose, including commercial applications, 
' and you may redistribute this software as part of application delivery: however, 
' this copyright notice may not be removed and you may not otherwise redistribute 
' this software directly other than providing a link to wwww.gendotnet.com. 
'
' You may alter this software to better server your needs (I'd like to hear about your 
' changes in order to make the software better). If you alter the softwre, you must  
' clearly mark it as altered and must not be misrepresented as the original software.
' nor wholly your original work.
'*************************************************************************************

Option Explicit On
Option Strict On

Imports System
Imports System.Collections.Generic



Public Class MapJoinBase
   ' I go to the trouble of using the interface here so I can avoid redundancy
   ' in later handcrafted code
   Implements IMapJoin

   Private ReadOnly Property MapMappingRoot1() As MapMappingRoot Implements IMapJoin.MapMappingRoot
      Get
         Return MyBase.MapMappingRoot
      End Get
   End Property

   Private Property Alias1() As String Implements IMapJoin.Alias
      Get
         Return Me.Alias
      End Get
      Set(ByVal value As String)
         Me.Alias = value
      End Set
   End Property

   Private Property Clause1() As String Implements IMapJoin.Clause
      Get
         Return Me.Clause
      End Get
      Set(ByVal value As String)
         Me.Clause = value
      End Set
   End Property

   Private Property JoinTo1() As String Implements IMapJoin.JoinTo
      Get
         Return Me.JoinTo
      End Get
      Set(ByVal value As String)
         Me.JoinTo = value
      End Set
   End Property

   Private Property JoinToColumn1() As String Implements IMapJoin.JoinToColumn
      Get
         Return Me.JoinToColumn
      End Get
      Set(ByVal value As String)
         Me.JoinToColumn = value
      End Set
   End Property

   Private Property JoinType1() As String Implements IMapJoin.JoinType
      Get
         Return Me.JoinType
      End Get
      Set(ByVal value As String)
         Me.JoinType = value
      End Set
   End Property

   Private Property LeftAlias1() As String Implements IMapJoin.LeftAlias
      Get
         Return Me.LeftAlias
      End Get
      Set(ByVal value As String)
         Me.LeftAlias = value
      End Set
   End Property

   Private Property LeftOriginalName1() As String Implements IMapJoin.LeftOriginalName
      Get
         Return Me.LeftOriginalName
      End Get
      Set(ByVal value As String)
         Me.LeftOriginalName = value
      End Set
   End Property

   Private ReadOnly Property MapJoinInColumns1() As MapJoinInColumnCollection Implements IMapJoin.MapJoinInColumns
      Get
         Return Me.MapJoinInColumns
      End Get
   End Property

   'Private ReadOnly Property MapJoinIns1() As MapJoinInCollection Implements IMapJoin.MapJoinIns
   '   Get
   '      Return Me.MapJoinIns
   '   End Get
   'End Property

   Private ReadOnly Property MapJoinKeys1() As MapJoinKeyCollection Implements IMapJoin.MapJoinKeys
      Get
         Return Me.MapJoinKeys
      End Get
   End Property

   Private Property Name1() As String Implements IMapJoin.Name
      Get
         Return Me.Name
      End Get
      Set(ByVal value As String)
         Me.Name = value
      End Set
   End Property

   Private Property NoColumns1() As Nullable(Of Boolean) Implements IMapJoin.NoColumns
      Get
         Return Me.NoColumns
      End Get
      Set(ByVal value As Nullable(Of Boolean))
         Me.NoColumns = value
      End Set
   End Property

   Private Property RightOriginalName1() As String Implements IMapJoin.RightOriginalName
      Get
         Return Me.RightOriginalName
      End Get
      Set(ByVal value As String)
         Me.RightOriginalName = value
      End Set
   End Property

   Private Property TableName1() As String Implements IMapJoin.TableName
      Get
         Return Me.TableName
      End Get
      Set(ByVal value As String)
         Me.TableName = value
      End Set
   End Property
End Class

Public Class MapJoinBaseCollection
   Implements IMapJoinCollection

   Private Function GetEnumerator1() _
           As IEnumerator(Of IMapJoin) _
           Implements IEnumerable(Of IMapJoin).GetEnumerator
      Return New MapJoinEnumerator(Me)
   End Function

   Public ReadOnly Property Count1() _
            As Integer _
            Implements IMapJoinCollection.Count
      Get
         Return Me.Count
      End Get
   End Property

   Default Public Overloads ReadOnly Property Item1(ByVal position As Integer) _
            As IMapJoin _
            Implements IMapJoinCollection.Item
      Get
         Return Me.Item(position)
      End Get
   End Property

   Default Public Overloads ReadOnly Property Item1( _
            ByVal joinName As String) _
            As IMapJoin _
            Implements IMapJoinCollection.Item
      Get
         For Each join As IMapJoin In Me
            If join.Name = joinName Then
               Return join
            End If
         Next
         Return Nothing
      End Get
   End Property

   Public Function GetByTableName( _
            ByVal rightTableName As String) _
            As IMapJoin _
            Implements IMapJoinCollection.GetByTableName
      For Each join As IMapJoin In Me
         If join.TableName = rightTableName Then
            Return join
         End If
      Next
      Return Nothing
   End Function
End Class

	